package javabase.desginpattern.structure.composite;

/**
 * @author fance
 * @date 18-4-28 下午1:36
 */
public class Client {


    public static void main(String[] args) {
        MarketBranch root = new MarketBranch("总店");
        MarketBranch branch = new MarketBranch("东莞分店");
        MarketJoin join1 = new MarketJoin("东莞分店-皇家加盟店");
        MarketJoin join2 = new MarketJoin("东莞分店-平民加盟店");
        branch.add(join1);
        branch.add(join2);
        root.add(branch);
        root.payByCard();
    }
}
